<extend name="Public/base"/>

<block name="body">
    <!-- 标题栏 -->
    <div class="main-title">
        <h2>[会员] 列表</h2>
    </div>
	<div class="cf">
		<div class="fl">
		<empty name="model.extend">
			<div class="tools">
				<!--<a class="btn" href="{:U('add?model='.$model['id'])}">新 增</a>-->
				<button class="btn ajax-post confirm" target-form="ids" url="{:U('member_del')}">删 除</button>
			</div>
		</empty>
		</div>
		<!-- 高级搜索 -->
		<div class="search-form fr cf">
			<div class="sleft">
				<input type="text" name="key" class="search-input" value="<?php echo $_GET['key']?>" placeholder="请输入用户名/姓名/手机">

				<a class="sch-btn" href="javascript:;" id="search" url="{:U('member')}"><i class="btn-search"></i></a>
			</div>
            <!--<div class="btn-group-click adv-sch-pannel fl">-->
                <!--<button class="btn">高 级<i class="btn-arrowdown"></i></button>-->
                <!--<div class="dropdown cf">-->
                	<!--<div class="row">-->
                		<!--<label>更新时间：</label>-->
                		<!--<input type="text" id="time-start" name="time-start" class="text input-2x" value="" placeholder="起始时间" /> - -->
                		<!--<input type="text" id="time-end" name="time-end" class="text input-2x" value="" placeholder="结束时间" />-->
                	<!--</div>-->
                	<!--<div class="row">-->
                		<!--<label>创建者：</label>-->
                		<!--<input type="text" name="nickname" class="text input-2x" value="" placeholder="请输入用户名">-->
                	<!--</div>-->
                <!--</div>-->
            <!--</div>-->
		</div>
	</div>


    <!-- 数据列表 -->
    <div class="data-table">
        <div class="data-table table-striped">
            <table>
                <!-- 表头 -->
                <thead>
                    <tr>
                        <th class="row-selected row-selected">
                            <input class="check-all" type="checkbox">
                        </th>
                       <th>id</th>
                       <th>用户名</th>
                       <th>借贷产品</th>
                       <th>手机</th>
                       <th>真实姓名</th>
                       <th>身份证正面</th>
                       <th>身份证反面</th>
                       <th>银行卡归属地</th>
                       <th>银行卡号</th>
                       <th>银行预留号码</th>
                       <th>状态</th>
                       <th>注册时间</th>
                       <th>借贷金额</th>
                       <th>操作</th>
                    </tr>
                </thead>

                <!-- 列表 -->
                <tbody>
                <?php foreach($list_data as $v){?>

                        <tr>
                            <td class="row-selected row-selected">
                                <input class="ids row-selected" type="checkbox" name="id[]" value="<?php echo $v['id']?>">
                            </td>
                            <td><?php echo $v['id']?></td>
                            <td><?php echo $v['user']?></td>
                            <td>
                                <?php echo $v['shop']['name'] ? $v['shop']['name'].' | '.$v['shop']['money']: '无';?>
                            </td>
                            <td><?php echo $v['phone']?></td>
                            <td><?php echo $v['name']?></td>
                            <td><a href="<?php echo $v['sfz_z']?>" target="_blank"><img style="width: 100px;
    height: 80px;" src="<?php echo $v['sfz_z']?>" alt=""></a></td>
                            <td><a href="<?php echo $v['sfz_f']?>" target="_blank"><img style="width: 100px;
    height: 80px;" src="<?php echo $v['sfz_f']?>" alt=""></a></td>
                            <td><?php echo $v['yhkgs']?></td>
                            <td><?php echo $v['yhkh']?></td>
                            <td><?php echo $v['yhkphone']?></td>
                            <td>
                                <?php
                                 if($v['start']==1){?>
                                     <span style="color: #0bb20c">正常</span>
                                 <?php }else if($v['start']==2){?>
                                    <span style="color: #14b8e4">完成自动认证</span>
                                 <?php }else if($v['start']==3){ ?>
                                    <span style="color: #e41e24">拉黑</span>
                                 <?php }else if($v['start']==4){ ?>
                                    <span style="color: #ffc124">审核完成</span>
                                 <?php }?>

                            </td>
                            <td><?php echo $v['time']?></td>
                            <td><?php echo $v['jdje']?></td>
                            <td>
                                <a title="编辑" href="<?php echo U('member_edit&id='.$v['id'])?>">编辑</a>
                                <a title="查看详情" href="<?php echo U('member_msg&id='.$v['id'])?>">详情</a>
                                <a class="confirm ajax-get" title="删除" href="<?php echo U('member_del&id='.$v['id'])?>">删除</a>
                            </td>
                        </tr>

                <?php }?>
                </tbody>
            </table>
        </div>
    </div>
    <div class="page">
        {$_page|default=''}
    </div>
</block>

<block name="script">
<script type="text/javascript">
$(function(){
	//搜索功能
	$("#search").click(function(){
		var url = $(this).attr('url');
        var query  = $('.search-form').find('input').serialize();
        query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
        query = query.replace(/^&/g,'');
        if( url.indexOf('?')>0 ){
            url += '&' + query;
        }else{
            url += '?' + query;
        }
		window.location.href = url;
	});

    //回车自动提交
    $('.search-form').find('input').keyup(function(event){
        if(event.keyCode===13){
            $("#search").click();
        }
    });

})
</script>
</block>
